\(\int \frac {1}{\sqrt {4 x+x^2}} \, dx\) [28]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 16 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=2 \text {arctanh}\left (\frac {x}{\sqrt {4 x+x^2}}\right ) \]

[Out]

2*arctanh(x/(x^2+4*x)^(1/2))

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {634, 212} \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=2 \text {arctanh}\left (\frac {x}{\sqrt {x^2+4 x}}\right ) \]

[In]

Int[1/Sqrt[4*x + x^2],x]

[Out]

2*ArcTanh[x/Sqrt[4*x + x^2]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {4 x+x^2}}\right ) \\ & = 2 \tanh ^{-1}\left (\frac {x}{\sqrt {4 x+x^2}}\right ) \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(39\) vs. \(2(16)=32\).

Time = 0.04 (sec) , antiderivative size = 39, normalized size of antiderivative = 2.44 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=-\frac {2 \sqrt {x} \sqrt {4+x} \log \left (-\sqrt {x}+\sqrt {4+x}\right )}{\sqrt {x (4+x)}} \]

[In]

Integrate[1/Sqrt[4*x + x^2],x]

[Out]

(-2*Sqrt[x]*Sqrt[4 + x]*Log[-Sqrt[x] + Sqrt[4 + x]])/Sqrt[x*(4 + x)]

Maple [A] (verified)

Time = 1.90 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.56

method result size
meijerg \(2 \,\operatorname {arcsinh}\left (\frac {\sqrt {x}}{2}\right )\) \(9\)
default \(\ln \left (2+x +\sqrt {x^{2}+4 x}\right )\) \(14\)
trager \(\ln \left (2+x +\sqrt {x^{2}+4 x}\right )\) \(14\)
pseudoelliptic \(2 \,\operatorname {arctanh}\left (\frac {\sqrt {x \left (4+x \right )}}{x}\right )\) \(15\)

[In]

int(1/(x^2+4*x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*arcsinh(1/2*x^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=-\log \left (-x + \sqrt {x^{2} + 4 \, x} - 2\right ) \]

[In]

integrate(1/(x^2+4*x)^(1/2),x, algorithm="fricas")

[Out]

-log(-x + sqrt(x^2 + 4*x) - 2)

Sympy [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=\log {\left (2 x + 2 \sqrt {x^{2} + 4 x} + 4 \right )} \]

[In]

integrate(1/(x**2+4*x)**(1/2),x)

[Out]

log(2*x + 2*sqrt(x**2 + 4*x) + 4)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=\log \left (2 \, x + 2 \, \sqrt {x^{2} + 4 \, x} + 4\right ) \]

[In]

integrate(1/(x^2+4*x)^(1/2),x, algorithm="maxima")

[Out]

log(2*x + 2*sqrt(x^2 + 4*x) + 4)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 33 vs. \(2 (14) = 28\).

Time = 0.28 (sec) , antiderivative size = 33, normalized size of antiderivative = 2.06 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=\frac {1}{2} \, \sqrt {x^{2} + 4 \, x} {\left (x + 2\right )} + 2 \, \log \left ({\left | -x + \sqrt {x^{2} + 4 \, x} - 2 \right |}\right ) \]

[In]

integrate(1/(x^2+4*x)^(1/2),x, algorithm="giac")

[Out]

1/2*sqrt(x^2 + 4*x)*(x + 2) + 2*log(abs(-x + sqrt(x^2 + 4*x) - 2))

Mupad [B] (verification not implemented)

Time = 9.37 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.69 \[ \int \frac {1}{\sqrt {4 x+x^2}} \, dx=\ln \left (x+\sqrt {x\,\left (x+4\right )}+2\right ) \]

[In]

int(1/(4*x + x^2)^(1/2),x)

[Out]

log(x + (x*(x + 4))^(1/2) + 2)